'- sdlBrt palette01_converterfromhexcolours.sdlbas > palette01.zxi
dim c[255]

'https://www.chromapost.net/?a=tml

c[00]=0x330000
c[01]=0x227788
c[02]=0xCC8866
c[03]=0xEECCAA

c[04]=0x223311
c[05]=0x223333
c[06]=0x558899
c[07]=0xBBBBBB

c[08]=0x772200
c[09]=0x995577
c[10]=0x6688AA
c[11]=0x88DDDD

c[12]=0x442222
c[13]=0x333344
c[14]=0x881111
c[15]=0xBBDDDD

c[16]=0x770000
c[17]=0x886666
c[18]=0x996600
c[19]=0xCC7744

c[20]=0x003344
c[21]=0x440088
c[22]=0x66AACC
c[23]=0xEECC77

c[24]=0xFF4400
c[25]=0xCC7744
c[26]=0x99BBBB
c[27]=0xEEBB00

c[28]=0x001133
c[29]=0x114444
c[30]=0x665577
c[31]=0x00CC66


print"palette01:"
print"'----- bbgggrrr"
print"asm"

for i=0 to 31
  t=c[i]
  b=bitwiseand(t,192)/64:t=int(t/256)
  g=bitwiseand(t,224)/32:t=int(t/256)
  r=bitwiseand(t,224)/32
  f=(b*64)+(g*8)+r
  o$=right$("00000000"+bin$(f),8)
  print "  defb "+o$+"b ;- #"+ucase$(right$("000000"+hex$(c[i]),6))
  next

print"  end asm"



